<?php
    require('./Utils.php');

    $post = getJsonParamter();

    $id = $post['id'];

    $conn = getConnection();
    $sql = "DELETE FROM board WHERE id = ?";

    $result = execute($conn, $sql, $id);

    if($result) getJson(200, '删除成功', null);

    else getJson(500, '删除失败', null);
?>